﻿<UserControl x:Class="AuroraPlatform.View.Level4.LightingVersionView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:controlsToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"  
    xmlns:local="clr-namespace:AuroraPlatform"     
    mc:Ignorable="d"
    d:DesignHeight="1200" d:DesignWidth="800" >
    <UserControl.Resources>
        <local:ZeroValueConverter x:Key="ZeroValueConverter"/>
        <local:ProdTypeConverter x:Key="ProdTypeConverter"/>
        <local:LightingTypeConverter x:Key="LightingTypeConverter"/>
        <local:AngleConverter x:Key="AngleConverter"/>
        <local:ColorConverter x:Key="ColorConverter"/>
        <local:UseAreaConverter x:Key="UseAreaConverter"/>
        <local:ImpactTypeConverter x:Key="ImpactTypeConverter"/>
        <local:SetupTypeConverter x:Key="SetupTypeConverter"/>
    </UserControl.Resources>
    <controlsToolkit:BusyIndicator x:Name="busy">
        <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"  BorderBrush="Transparent" BorderThickness="0" IsTabStop="False" TabNavigation="Once" Padding="0" Margin="0">
            <Grid x:Name="LayoutRoot" Background="White" Margin="15,15,0,0">
                <Grid.RowDefinitions>
                    <RowDefinition Height="20"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="230"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>

                <TextBlock x:Name="Title" FontSize="14" FontWeight="Bold" HorizontalAlignment="Left" VerticalAlignment="Top" Text="{Binding ProdVersion}" Grid.ColumnSpan="3"/>
                <Viewbox Tag="{Binding PicFacade}" Stretch="Fill" Height="180" Width="180" VerticalAlignment="Top" HorizontalAlignment="Left" Grid.Row="1" Cursor="Hand" MouseLeftButtonDown="Viewbox_MouseLeftButtonDown">
                    <Image Source="{Binding PicFacade}"/>
                </Viewbox>

                <Grid Grid.Row="1" Grid.Column="1" x:Name="Grid">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="90"/>
                        <ColumnDefinition Width="10"/>
                        <ColumnDefinition Width="300"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock FontSize="13" Text="产品描述" HorizontalAlignment="Left" VerticalAlignment="Center"/>
                    <TextBlock FontSize="13" Grid.Row="1" Text="产品系列" HorizontalAlignment="Right" VerticalAlignment="Center"/>
                    <TextBlock FontSize="13" Grid.Row="2" Text="产品分类" HorizontalAlignment="Right" VerticalAlignment="Center"/>
                    <TextBlock FontSize="13" Grid.Row="3" Text="使用场所" HorizontalAlignment="Right" VerticalAlignment="Center"/>
                    <TextBlock FontSize="13" Grid.Row="4" Text="规格型号" HorizontalAlignment="Right" VerticalAlignment="Center"/>
                    <TextBlock FontSize="13" Grid.Row="5" Text="产品品牌" HorizontalAlignment="Right" VerticalAlignment="Center"/>
                    <TextBlock FontSize="13" Grid.Row="6" Text="外观颜色" HorizontalAlignment="Right" VerticalAlignment="Center"/>
                    <TextBlock FontSize="13" Grid.Row="7" Text="外形尺寸" HorizontalAlignment="Right" VerticalAlignment="Center"/>
                    <TextBlock FontSize="13" Grid.Row="8" Text="防护等级" HorizontalAlignment="Right" VerticalAlignment="Center"/>
                    <TextBlock FontSize="13" Grid.Row="9" Text="防撞等级" HorizontalAlignment="Right" VerticalAlignment="Center"/>

                    <TextBlock FontSize="13" Grid.Row="10" Text="光源描述" HorizontalAlignment="Left" VerticalAlignment="Center"/>
                    <TextBlock FontSize="13" Grid.Row="11" Text="光源种类" HorizontalAlignment="Right" VerticalAlignment="Center"/>
                    <TextBlock FontSize="13" Grid.Row="12" Text="光源功率" HorizontalAlignment="Right" VerticalAlignment="Center"/>
                    <TextBlock FontSize="13" Grid.Row="13" Text="光源色温" HorizontalAlignment="Right" VerticalAlignment="Center"/>
                    <TextBlock FontSize="13" Grid.Row="14" Text="显色性" HorizontalAlignment="Right" VerticalAlignment="Center"/>

                    <TextBlock FontSize="13" Grid.Row="15" Text="光学参数" HorizontalAlignment="Left" VerticalAlignment="Center"/>
                    <TextBlock FontSize="13" Grid.Row="16" Text="光束角" HorizontalAlignment="Right" VerticalAlignment="Center"/>

                    <TextBlock FontSize="13" Grid.Row="17" Text="工程参数" HorizontalAlignment="Left" VerticalAlignment="Center"/>
                    <TextBlock FontSize="13" Grid.Row="18" Text="安装方式" HorizontalAlignment="Right" VerticalAlignment="Center"/>

                    <TextBlock FontSize="13" Grid.Row="19" Text="商务参数" HorizontalAlignment="Left" VerticalAlignment="Center"/>
                    <TextBlock FontSize="13" Grid.Row="20" Text="市场参考价" HorizontalAlignment="Right" VerticalAlignment="Center"/>

                    <TextBlock FontSize="13" Text="{Binding ProdSeries}" Grid.Column="2" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="Gray"/>
                    <TextBlock FontSize="13" Text="{Binding ProdClass, Converter={StaticResource ProdTypeConverter}}" Grid.Column="2" Grid.Row="2" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="Gray"/>
                    <TextBlock FontSize="13" Text="{Binding ProdPlace, Converter={StaticResource UseAreaConverter}}" Grid.Column="2" Grid.Row="3" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="Gray"/>
                    <TextBlock FontSize="13" Text="{Binding ProdVersion}" Grid.Column="2" Grid.Row="4" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="Gray"/>
                    <TextBlock FontSize="13" Text="{Binding ProdLabel}" Grid.Column="2" Grid.Row="5" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="Gray"/>
                    <TextBlock FontSize="13" Text="{Binding PhyColor}" Grid.Column="2" Grid.Row="6" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="Gray"/>
                    <TextBlock FontSize="13" Text="{Binding PhySize}" Grid.Column="2" Grid.Row="7" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="Gray"/>
                    <TextBlock FontSize="13" Text="{Binding PhyDefend}" Grid.Column="2" Grid.Row="8" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="Gray"/>
                    <TextBlock FontSize="13" Text="{Binding PhyImpact, Converter={StaticResource ImpactTypeConverter}}" Grid.Column="2" Grid.Row="9" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="Gray"/>

                    <TextBlock FontSize="13" Text="{Binding AdpClass, Converter={StaticResource LightingTypeConverter}}" Grid.Column="2" Grid.Row="11" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="Gray"/>
                    <TextBlock FontSize="13" Text="{Binding EleLgtPower, Converter={StaticResource ZeroValueConverter}, ConverterParameter=W}" Grid.Column="2" Grid.Row="12" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="Gray"/>
                    <TextBlock FontSize="13" Text="{Binding AdpColor, Converter={StaticResource ColorConverter}}" Grid.Column="2" Grid.Row="13" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="Gray"/>
                    <TextBlock FontSize="13" Text="{Binding AdpCri}" Grid.Column="2" Grid.Row="14" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="Gray"/>

                    <TextBlock FontSize="13" Text="{Binding OptAngle, Converter={StaticResource AngleConverter}}" Grid.Column="2" Grid.Row="16" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="Gray"/>
                    <TextBlock FontSize="13" Text="{Binding ProjSetup, Converter={StaticResource SetupTypeConverter}}" Grid.Column="2" Grid.Row="18" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="Gray"/>
                    <TextBlock FontSize="13" Text="{Binding BusMarket, Converter={StaticResource ZeroValueConverter}, ConverterParameter=RMB}" Grid.Column="2" Grid.Row="20" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="Gray"/>
                </Grid>

                <Grid Grid.Row="1" Grid.Column="2">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>

                    <Viewbox Cursor="Hand" Tag="{Binding PicLive}" MouseLeftButtonDown="Viewbox_MouseLeftButtonDown" Stretch="Fill" Height="300" Width="230" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.ColumnSpan="2">
                        <Image Source="{Binding PicLive}"/>
                    </Viewbox>

                    <Viewbox Cursor="Hand" Tag="{Binding PicSize}" MouseLeftButtonDown="Viewbox_MouseLeftButtonDown" Margin="3" Stretch="Fill" Height="110" Width="100" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Row="1">
                        <Image Source="{Binding PicSize}"/>
                    </Viewbox>

                    <Viewbox Cursor="Hand" Tag="{Binding PicGrading}" MouseLeftButtonDown="Viewbox_MouseLeftButtonDown" Margin="3" Stretch="Fill" Height="110" Width="120" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Row="1" Grid.Column="1">
                        <Image Source="{Binding PicGrading}"/>
                    </Viewbox>
                </Grid>

                <Grid Grid.Row="2" Grid.ColumnSpan="3" Margin="0, 5, 0, 0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="80"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.Resources>
                        <!-- DataTemplate for Photograph instances -->
                        <DataTemplate x:Key="PhotographTemplate">
                            <StackPanel Width="150">
                                <Image Source="{Binding PicFacade}" Height="100" Width="100" Stretch="UniformToFill"/>
                                <TextBlock Margin="0,5,0,0" Grid.Column="1" Text="{Binding ProdLabel}" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="13"/>
                            </StackPanel>
                        </DataTemplate>
                    </Grid.Resources>

                    <Border Height="1" Grid.ColumnSpan="2" VerticalAlignment="Top" HorizontalAlignment="Stretch" BorderBrush="#BFBFBF" BorderThickness="0, 2, 0, 0"/>

                    <TextBlock FontSize="14" FontWeight="Bold" Foreground="Gray" HorizontalAlignment="Left" VerticalAlignment="Top" Text="相关产品：" Margin="0,10,0, 0"/>
                    <ListBox x:Name="Pictures" Width="750" Grid.Column="1" VerticalAlignment="Top" HorizontalAlignment="Left"
                  Style="{StaticResource WrapListBox}"
                  ItemTemplate="{StaticResource PhotographTemplate}"
                  Margin="4" />
                </Grid>
            </Grid>
        </ScrollViewer>
    </controlsToolkit:BusyIndicator>
</UserControl>














